// Silly XML.
return substr( $start, 0, -1 ) . '/>';
} else {
- return "$start$contents" . self::closeElement( $element );
+ return $start . $contents . self::closeElement( $element );
}
}
if ( $isXHTML ) { // XHTML5
// XML MIME-typed markup should have an xml header.
// However a DOCTYPE is not needed.
- $ret .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n";
+ $ret .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
// Add the standard xmlns
$attribs['xmlns'] = 'http://www.w3.org/1999/xhtml';
$elevatedText = $elevated ? 'by elevated ' : '';
$log = LoggerFactory::getInstance( "security" );
$log->warning(
- "Unsafe JS/CSS/Json $elevatedText" . "load - {user} loaded {title} with {ctype}",
+ "Unsafe JS/CSS/Json {$elevatedText}load - {user} loaded {title} with {ctype}",
[
'user' => $this->getUser()->getName(),
'title' => $title->getPrefixedDBKey(),
public function dirIsExecutable( $dir, $url ) {
$scriptTypes = [
'php' => [
- "<?php echo 'ex' . 'ec';",
- "#!/var/env php\n<?php echo 'ex' . 'ec';",
+ "<?php echo 'exec';",
+ "#!/var/env php\n<?php echo 'exec';",
],
];
$matches = [];
$taglist = implode( '|', $elements );
- $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?" . ">)|<(!--)/i";
+ $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?>)|<(!--)/i";
while ( $text != '' ) {
$p = preg_split( $start, $text, 2, PREG_SPLIT_DELIM_CAPTURE );
$colon = $this->msg( 'colon-separator' )->escaped();
if ( !empty( $allCats['normal'] ) ) {
- $t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
+ $t = $embed . implode( $pop . $embed, $allCats['normal'] ) . $pop;
$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
$linkPage = $this->msg( 'pagecategorieslink' )->inContentLanguage()->text();
$title = Title::newFromText( $linkPage );
$link = $title ? Linker::link( $title, $msg ) : $msg;
$s .= '<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
- $link . $colon . '<ul>' . $t . '</ul>' . '</div>';
+ $link . $colon . '<ul>' . $t . '</ul></div>';
}
# Hidden categories
$s .= "<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
$this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
- $colon . '<ul>' . $embed . implode( "{$pop}{$embed}", $allCats['hidden'] ) . $pop . '</ul>' .
+ $colon . '<ul>' . $embed . implode( $pop . $embed, $allCats['hidden'] ) . $pop . '</ul>' .
'</div>';
}
fwrite( STDERR, "\n" );
$s =
- "<" . "?php\n" .
+ "<?php\n" .
"## This file is generated by mergeMessageFileList.php. Do not edit it directly.\n\n" .
"if ( defined( 'MW_NO_EXTENSION_MESSAGES' ) ) return;\n\n" .
'$wgExtensionMessagesFiles = ' . var_export( $wgExtensionMessagesFiles, true ) . ";\n\n" .
'{"file":"db1023-bin.001288","pos":"308257743","asOfTime":' .
// Embed dynamically because TestSetup sets serialize_precision=17
// which, in PHP 7.1 and 7.2, produces 1457521464.3814001 instead
- json_encode( 1457521464.3814 ) . '} ' . 'triggeredRecursive=1 ' .
+ json_encode( 1457521464.3814 ) . '} triggeredRecursive=1 ' .
$requestId
],
];
} catch ( DBUnexpectedError $ex ) {
$this->assertSame(
'Invalid atomic section ended (got ' . __METHOD__ . ' but expected ' .
- __METHOD__ . 'X' . ').',
+ __METHOD__ . 'X).',
$ex->getMessage()
);
}
);
$innerFactory->expects( $this->once() )
->method( $method )
- ->with( 'testprefix.' . 'metricname' );
+ ->with( 'testprefix.metricname' );
$proxy = new PrefixingStatsdDataFactoryProxy( $innerFactory, 'testprefix' );
// 1,2,3,4 simply makes sure we provide enough parameters, without caring what they are
);
$innerFactory->expects( $this->once() )
->method( $method )
- ->with( 'testprefix.' . 'metricname' );
+ ->with( 'testprefix.metricname' );
$proxy = new PrefixingStatsdDataFactoryProxy( $innerFactory, 'testprefix...' );
// 1,2,3,4 simply makes sure we provide enough parameters, without caring what they are
// Query added
$this->assertEquals(
- '<a href="/w/index.php?title=Foobar&foo=bar" ' . 'title="Foobar">Foobar</a>',
+ '<a href="/w/index.php?title=Foobar&foo=bar" title="Foobar">Foobar</a>',
$linkRenderer->makeKnownLink( $target, null, [], [ 'foo' => 'bar' ] )
);